<?php

require_once './include/common.inc.php';
require_once 'left.php';
require_once 'right.php';

$page_title = 'Acuity World WebShop';
$menu_id = 0;
$menu_str = PrintMenu();

$promoter_menu_id = 1;
$promoter_menu_str = PrintPromoterMenu();

if (isPromoterLogin()) {
    $sql = "SELECT * FROM  `promoter_info` WHERE  `id` = '$promoter_uid'";
    $promoter_info_ary = $db->get_one($sql);
} else {
    header("LOCATION:promoter_login.php");
    exit;
}

$asa = 0;   // Accumulated Sales Amount销售的产品总值
$ac = 0;    // Accumulated Commission佣金总数（未付＋已付）
$co = 0;    // Commission Outstanding未付佣金

$cms=getCms($promoter_uid);
$asa=$cms["cost"];
$ac=$cms["cms"];
$co=$cms["cms_osd"];

/*
* $c_r_products     // Commission rates: Products
* $c_r_special      // Commission rates: Special Products
* $c_r_trainings    // Commission rates: Trainings
* $c_r_pcsd1        // Commission rates: Promoter Commission Settlement Dates 1
* $c_r_pcsd2        // Commission rates: Promoter Commission Settlement Dates 2
*/

$rank_str = 'commission_rates_' . strtolower($RANK_ARY[$promoter_info_ary['rank']]);
$c_r_str = getMvalue($rank_str);
list($c_r_products, $c_r_special, $c_r_trainings, $c_r_pcsd1, $c_r_pcsd2) = explode("||", $c_r_str);
$c_r_products = number_format($c_r_products, 2, '.', '');
$c_r_trainings = number_format($c_r_trainings, 2, '.', '');
$c_r_special = number_format($c_r_special, 2, '.', '');



require_once PrintEot('header');
require_once PrintEot('left');
require_once PrintEot('promoter_summary');
require_once PrintEot('right');
require_once PrintEot('footer');

?>